import {
  getRequest,
  postRequest,
  postJsonRequest
} from '@/api/axios.js'

// 用于获取课程id对应的课程详细信息
export const getCourseDetails = (params) => {
  return postRequest('/sys/course-info/getCourseDetails', params)
}

// 用于获取登陆的用户的全部学习的课程
export const getStudentCourseUniapp = (params) => {
  return postRequest('/sys/course-info/getStudentCourseUniapp', params)
}

// 用于获取课程是否结束
export const isCourseEnd = (params) => {
  return postRequest('/sys/course-info/isCourseEnd', params)
}

// ！！！！！！公告！！！！！！
// 获取课程对应的公告
export const getCourseNotice = (params) => {
  return postRequest('/sys/course-notice/getCourseNotice', params)
}

// ！！！！！！课件！！！！！！
// 获取课程ID对应的课程章节
export const getCourseDetailsChapter = (params) => {
  return postRequest('/sys/course-chapter/getCourseDetailsChapter', params)
}
// 获取发送的课程ID对应的课程视频的地址
export const getCourseViedoAddressUniapp = (params) => {
  return postRequest('/sys/course-chapter/getCourseViedoAddressUniapp', params)
}
// 用于记录用户播放的每个视频的进度
export const recordVideoProgressUniapp = (params) => {
  return postRequest('/sys/course-video-history/recordVideoProgressUniapp', params)
}
// 用于记录用户播放完视频
export const recordVideoProgressFinishUniapp = (params) => {
  return postRequest('/sys/course-video-history/recordVideoProgressFinishUniapp', params)
}
